<script setup>
import { ref } from 'vue';
import Footer from './footer.vue';
import obj from './a.js';
import { useRoute, useRouter } from 'vue-router';

const route = useRoute();
const router = useRouter();

console.log(obj.a, route.meta.a, route.query.a);
obj.a = '999';
route.meta.a = '888';
router.replace({ query: { a: '777' } });

const count = ref(0);

window.clickHandler = () => {
  count.value++;
  console.log('--clickHandler--', count.value);
};

const html = `<button onclick="clickHandler()">按钮 ${count.value}</button>`;
</script>

<template>
  <div v-html="html"></div>
  count: {{ count }}

  <Footer />
</template>

<style scoped></style>
